﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using cms.libs;

namespace CMS
{
    public partial class ReportBetLogSpin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
//            txtFromDate.SelectedDate = DateTime.Now.AddDays(-10);
//            txtToDate.SelectedDate = DateTime.Now;
            if (!IsPostBack)
            {
                BindData();
            }
        }
        protected void BindData()
        {
//            DateTime fromD = txtFromDate.SelectedDate.Value;
//            DateTime toD = txtToDate.SelectedDate.Value;

            DataTable lst = new DBAccountReport().GetBetLogSpin(int.Parse(txtBetLogID.Text));

            /*string jsondetail = "";
        
            new DBAccountReport().GetInfoWithResult(int.Parse(txtBetLogID.Text), ref jsondetail);

            ltOutput.Text = jsondetail;*/


            GridView1.DataSource = lst;
            GridView1.DataBind();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if(Page.IsValid)
                BindData();
        }
        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView1.PageIndex = e.NewPageIndex;
            BindData();
        }

        /*protected void gvResults_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.DataItem != null)
            {
                LinkButton lb = (LinkButton)GridView1.FindControl("hlDetails");
                lb.CommandArgument = GridView1.DataKeys[e.Row.RowIndex].Value;
                lb.CommandName = "ViewDetails";

            }
        }

        protected void gvResults_RowCommand(object sender, CommandEventArgs e)
        {
            switch (e.CommandName.ToLower())
            {
                case "ViewDetails":

                    break;
                default:
                    break;
            }
        }*/
    }
}